﻿using Future.Common.Enum;
using SqlSugar;

namespace Future.Model.SysModel
{
    /// <summary>
    /// 描述：菜单
    /// 创建人： yangkai
    /// 创建时间：2022/11/4 18:24:41
    /// </summary>
    [SugarTable("Sys_Menu")]
    public class MenuModel
    {
        /// <summary>
        /// 主键
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string MenuName { get; set; } = string.Empty;

        /// <summary>
        /// 父菜单ID
        /// </summary>
        public Guid? ParentId { get; set; }

        /// <summary>
        /// 显示顺序
        /// </summary>
        public int OrderNum { get; set; }

        /// <summary>
        /// 请求地址
        /// </summary>
        public string Url { get; set; } = string.Empty;

        /// <summary>
        /// 是否为外部链接 
        ///</summary>
        public bool? IsLink { get; set; }

        /// <summary>
        /// 打开方式（menuItem页签 menuBlank新窗口）
        /// </summary>
        public string Target { get; set; } = string.Empty;

        /// <summary>
        /// 菜单类型（1目录 2菜单 3按钮）
        /// </summary>
        public MenuTypeEnum MenuType { get; set; }

        /// <summary>
        /// 菜单状态（1显示 0隐藏）
        /// </summary>
        public bool Visible { get; set; }

        /// <summary>
        /// 是否刷新（1刷新 0不刷新）
        /// </summary>
        public bool IsRefresh { get; set; }

        /// <summary>
        /// 权限标识
        /// </summary>
        public string PermissionCode { get; set; } = string.Empty;

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; } = string.Empty;

        /// <summary>
        /// 菜单组件路由 
        ///</summary>
        public string Router { get; set; } = string.Empty;

        /// <summary>
        /// 组件路径 
        ///</summary>
        public string Component { get; set; } = string.Empty;

        /// <summary>
        /// 路由参数 
        ///</summary>
        public string Query { get; set; } = string.Empty;

        /// <summary>
        /// 创建人
        /// </summary>
        public string CreateBy { get; set; } = string.Empty;

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        public string UpdateBy { get; set; } = string.Empty;

        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = string.Empty;

        /// <summary>
        /// 子节点
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public List<MenuModel>? Children { get; set; }
    }
}
